#ifndef _LED_H_
#define _LED_H_

#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_log.h"
#include "driver/rmt_tx.h"
#include "led_strip_encoder.h"
#include "driver/gpio.h"
// #include "rmt_types_legacy.h"


typedef enum{
    LED_OFF = 0,
    LED_ON,
    LED_MENU_HUE,
    LED_MENU_SATURATION,
    LED_MENU_VALUE,
}LED_STATUS;

typedef struct {
    uint8_t first;     //一级菜单标志位
    uint16_t second;    //二级菜单标志位
    uint8_t last;      //三级彩单标志位
}MENU_STRUCT;


void led_init(void);
void led_point_set_rgb(uint16_t point, uint32_t r, uint32_t g, uint32_t b);
void led_point_set_hsv(uint16_t point, uint32_t h, uint32_t s, uint32_t v);
void led_set_all_rgb(uint32_t r, uint32_t g, uint32_t b);
void led_set_all_hsv(uint32_t h, uint32_t s, uint32_t v);
void led_refresh(void);
void led_off(void);
void led_on(void);
void disp_menu(uint8_t first, uint8_t second, uint8_t last);

#endif
